home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-17 | 6.8 KB | 188 lines | [TEXT/MPS ] |
- #
- # ****************************************************************************
- #
- # File Name: Excel4.vu
- #
- # Contains: Quick look test script for Excel version 4.0
- #
- # Written by: Kevin Avoy, Ken Landreth, Michael Leong, Gil Spencer et al
- #
- # Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
- #
- # ****************************************************************************
- # C h a n g e H i s t o r y (most recent first):
- # ****************************************************************************
- #
- # Vers Date Author Description
- # ---- -------- ------ ---------------------------------------------
- # <1.0.4> 7/19/93 KTA Updates for FindWindow() to handle descriptors.
- # <1.0.3> 7/14/93 KTA Fixed Bug - gCustomNewDocDialog was defined, but it was not
- # defined as a list.
- # <1.0.2> 6/16/93 NAGA Renaming InitGlobals(ScriptLevel)to InitGlobals(ScriptLevel)
- # <1+> 5/25/93 NAGA Adding header and porting old files to follow new standards
- #
- # ****************************************************************************
- #
-
-
-
- ########################################################################
- # External libraries
- #=======================================================================
- Libraries "Output.Lib", "DoTasks.Lib","UserInterface.Lib","Draw.Lib", "Font.Lib", "Globals.Lib", "LaunchQuit.Lib", "TCS.Lib";
-
-
- #########################################################################
- ######## Application Specific Tasks
- #########################################################################
-
- #########################################################################
- # InitAppGlobals()
- #========================================================================
- # Author: ML
- # Description: Sets up tools and fonts for Excel. This task
- # must be called first.
- # Parameters: None
- # Returns: Nothing
- # Examples: InitAppGlobals()
- #========================================================================
- # History:
- #
- ########################################################################
- task InitAppGlobals()
- begin
-
- logstr("setting up {global gApptitle}'s globals");
- global kClick, kDrag, kMultiDrag, kMultiClickDrag, kMultiClick;
- global kPalDocWind, kPalWind, kPullOffPal, kPopUpPal, kScrollPal;
- global gDocumentWindow := [window c:True g:True z:True]!;
- global gCustomNewDocDialog := [window t:'New']!;
- global gDoWindowList := {1,0,1,1}; # VU doesn't recognize scrollbars
- global gScreenInset := {0,40,0,50}; # Allow for toolbars at top and bottom
-
-
- # Not tools or fonts set up because of Excel limitations - see note below
-
- end; #InitAppGlobals
-
- #########################################################################
- # NumberCalc()
- #========================================================================
- # Author: KTA
- # Description: Enters in a numbers to be used in a simple speadsheet
- # calculation.
- # Parameters: None
- # Returns: Nothing
- # Examples: NumberCalc();
- # Assumptions: None
- #========================================================================
- # History:
- #
- #########################################################################
- task NumberCalc() begin
- numbersList :={"=sum(b18:b22)",40,30,20,10,1000};
- SpecialKey( rightarrowkey, "RightArrow Key");
- TypeList(NumbersList,4,1);
- end;
-
- #########################################################################
- # TextLabels()
- #========================================================================
- # Author: KTA
- # Description: Enters in a Labels to be used in a simple speadsheet
- # calculation.
- # Parameters: None
- # Returns: Nothing
- # Examples: TextLabels();
- # Assumptions: None
- #========================================================================
- # History:
- #
- #########################################################################
- task TextLabels() begin
- textList :={"Quarterly Earnings","Mortgage", "Paper", "Utilities", "Garbage", 'Phone', 'Total'};
- LogStr("Beginning Excel Example",3);
- TypeList(textList,1);
- end;
-
- #########################################################################
- # ExcelEx()
- #========================================================================
- # Author: KTA
- # Description: Sets up a simple speadsheet calculation test.
- # Parameters: None
- # Returns: Nothing
- # Examples: ExcelEx();
- # Assumptions: None
- #========================================================================
- # History:
- #
- #########################################################################
- task ExcelEx() begin
- SelectMenuItem('Goto...', 'Formula');
- TypeStr("A17");
- SpecialKey( returnkey, "return Key");
- TextLabels();
- NumberCalc();
- LogStr("Entered some data and performed a calculation",3);
- end;
-
- #########################################################################
- # Views()
- #========================================================================
- # Author: ML
- # Description: Test Views
- # Parameters: Kind
- # Returns: Nothing
- # Examples: Views();
- # Assumptions: None
- #========================================================================
- # History:
- #
- ########################################################################
- task Views()
- begin
- logstr("Changing Views...");
- SizeButtonLoc := {{26,50},{26,86},{26,104},{26,121},{26,68}};
- SizeButtonList:= {'200%','75%','50%','25%','100%'};
- CardButtonLoc := card(SizeButtonLoc);
- for i := 1 to CardButtonLoc
- begin
- ButtonLoc := SizeButtonLoc[i];
- SelectMenuItem("Zoom...", "Window");
- sizebutton :=SizeButtonList[i];
- logstr("Selecting the {sizebutton} radio button",1);
- MoveRelativeToWindow(ButtonLoc[1],ButtonLoc[2],'Zoom',2);
- SpecialKey( returnkey, "return Key");
- end;
- end;
-
- ################################################################################
- #################### Main script ####################
- ################################################################################
- script Excel (ScriptLevel:= -1)
- begin
- InitGlobals(ScriptLevel); # initialize your general globals
- InitDraw();
- InitFonts();
- global gAppTitle := 'Microsoft Excel'; # Title of app you will be running
- global gAppVersion := '4'; # version of app you will be running
- SuiteStart('Excel4.vu'); # begin a new test suite
- if LaunchTwitch("{gAppTitle}",gAliasDirectory) # launch or twitch to your app
- begin
- global gFileName := "@!@-{gBuildVers}-Excel"; # This is used in NameOK when saving files
- InitAppGlobals(); # init app specific globals
- (*
- *)
- DoSetUpApp(,,,1,1,1);
- ExcelEx();
- DoWindow();
- Views();
- DoCloseApp();
- LogStr("############################# LIMITATIONS: ############################");
- LogStr("NOTE: No DoText because Excel has uses a font dialog box. No DoDraw
- because there is no way for VU to: 1) uniquely identify the draw palette and
- 2) know whether the palette is set up as a floating window or a toolbar.");
- end; # if LaunchTwitch("{gAppTitle}",gAliasDirectory)
- SuiteEnd();
- end; # script Excel